import {
  getTemperatureByChild,
  getFeedingByChild,
  getTePottyByChild,
  getSleepByChild,
  getHandoverByChild
} from '../../api'

export const panels = {
  temperature: {
    title: '体温状况',
    fn: getTemperatureByChild,
    icon: 'icon-ruyuantiwen',
    iconBgColor: '#009FE8',
    span: 24
  },
  sleep: {
    title: '睡眠情形',
    fn: getSleepByChild,
    icon: 'icon-shuimian1',
    iconBgColor: '#8A92C7',
    span: 12
  },
  // diaper: {
  //   title: '换尿布状况',
  //   fn: getTePottyByChild,
  //   span: 12,
  //   iconBgColor: '#FFDB24',
  //   icon: 'icon-baby1'
  // },
  diet: {
    title: '饮食方面',
    fn: getFeedingByChild,
    iconBgColor: '#FA8E5C',
    span: 12,
    icon: 'icon-yinshi'
  },
  // healthy: {
  //   title: '健康情形',
  //   fn: getMedicationByChild,
  //   iconBgColor: '#DA473A',
  //   icon: 'icon-jiankangguanli',
  //   span: 12
  // },
  drug: {
    title: '用药需求',
    fn: getHandoverByChild,
    iconBgColor: '#15C434',
    span: 12,
    icon: 'icon-zhiyao'
  },
  toilet: {
    title: '如厕状况',
    fn: getTePottyByChild,
    iconBgColor: '#FF7E7D',
    span: 12,
    icon: 'icon-zhaocesuo'
  }
}

export const dietType = [
  { value: 0, label: '随餐' },
  { value: 1, label: '早餐' },
  { value: 2, label: '上午点心' },
  { value: 3, label: '中餐' },
  { value: 4, label: '下午点心' },
  { value: 5, label: '晚餐' },
  { value: 6, label: '晚餐' }
]

export const dietQuantityType = [
  { value: 0, label: '正常' },
  { value: 1, label: '量少' },
  { value: 2, label: '量多' }
]

export const pottyColor = [
  { value: 0, label: '正常' },
  { value: 1, label: '偏黑' },
  { value: 2, label: '偏绿' },
  { value: 3, label: '其他' }
]

export const pottyState = [
  { value: 0, label: '正常' },
  { value: 1, label: '偏稀' },
  { value: 2, label: '偏硬' }
]
let timeLine = []

for (let i = 6; i < 21; i++) {
  const time = i < 10 ? '0' + i : i
  timeLine = timeLine.concat([
    {
      prop: time + ':00',
      label: time + ':00'
    },
    {
      prop: time + ':15',
      label: time + ':15'
    },
    {
      prop: time + ':30',
      label: time + ':30'
    }
  ])
}

console.log(timeLine)

export const columnsObj = [
  {
    prop: 'type',
    label: '类目',
    rest: {
      fixed: 'left'
    }
  },
  ...timeLine
]

